<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="layout.xhtml">
        <ui:define name="title">
            <h2><a href="#" class="back" onclick="history.go(-1)"/>Visualizar Campus</h2>
        </ui:define>

        <ui:define name="body">
            <p:panel styleClass="container_24 clearfix">
                <div class="buttonAction" style="float: right">
                    <p:button value="Editar" icon="ui-icon-pencil" styleClass="ui-priority-primary"
                              href="editarsecretaria.xhtml?secEd=#{managerPesquisarSecretaria.secretariaVisualizar.id}" />
                </div>
                <br/>
            </p:panel>

            <h:form id="secretariaForm" enctype="multipart/form-data">            
                <p:messages id="messages" closable="true" showDetail="true" autoUpdate="true"  />

                <p:panel styleClass="container_24 clearfix">
                    <h2>Dados Gerais</h2>

                    <p:outputLabel value="Nome:" styleClass="grid_3"/>
                    <p:inputText styleClass="grid_20" readonly="true" value="#{managerPesquisarSecretaria.secretariaVisualizar.nome}"/>
                    <div class="clear"/>

                    <p:outputLabel value="Diretor:" styleClass="grid_3"/>
                    <p:inputText styleClass="grid_20" readonly="true" value="#{managerPesquisarSecretaria.secretariaVisualizar.nomeSecretario}"/>
                    <div class="clear"/>

                    <p:outputLabel value="Sigla:" styleClass="grid_3"/>
                    <p:inputText styleClass="grid_20" readonly="true" value="#{managerPesquisarSecretaria.secretariaVisualizar.sgl}"/>
                    <div class="clear"/>

                    <p:outputLabel value="Descrição:" styleClass="grid_3"/>
                    <p:inputText styleClass="grid_20" readonly="true" value="#{managerPesquisarSecretaria.secretariaVisualizar.descricao}"/>

                </p:panel>

                <p:panel id="panelSetor" styleClass="container_24 clearfix">
                    <h2><a href="#">Setor</a></h2>
                    <br/>

                    <p:dataTable id="tableSetor" var="item" value="#{managerPesquisarSecretaria.setoresVisualizar}" 
                                 styleClass="grid_24" rowIndexVar="rowid" 
                                 style="white-space: pre-wrap;"
                                 rowKey="#{item.id}" rows="5" paginator="true"  
                                 paginatorPosition="bottom" emptyMessage="Nenhum registro">  
                        <f:facet name="header">
                            <p:outputLabel value="Setores" />
                        </f:facet>
                        <p:column headerText="Nome">
                            <p:outputLabel value="#{item.nome}"/>
                        </p:column>

                    </p:dataTable>
                </p:panel>
                <br/>
                <div class="buttonAction" >
                    <p:button value="Voltar" icon="ui-icon-circle-arrow-w" href="indexsecretaria.xhtml" />
                </div>

            </h:form>
        </ui:define>
    </ui:composition>
</html>
